<?php
error_reporting(0);
session_start();


define("DATABASE_NAME", "apptemplate");
define("DATABASE_USER", "root");
define("DATABASE_PASSWORD", "");
define("DATABASE_HOST", "localhost");
define("SITE_NAME", "PHP TEMPLATE - ADMINISTRATOR TOOLS");

/*
define("DATABASE_NAME", "b2bsupplierdb");
define("DATABASE_USER", "vnsupplierscom");
define("DATABASE_PASSWORD", "abc123");
define("DATABASE_HOST", "vnsupplierscom.fatcowmysql.com");
define("SITE_NAME", "VNSuppliers");
*/
$requestURI = $_SERVER["REQUEST_URI"];

$uris = explode("/", $requestURI);
//print_r($uris);
if ($uris[1]!="admin" && count($uris)>=3) {
	define("URL_SITE", "http://".$_SERVER["HTTP_HOST"]."/".$uris[1]."/");
	$root = $_SERVER["DOCUMENT_ROOT"]."/".$uris[1]."/";
}
else {
	define("URL_SITE", "http://".$_SERVER["HTTP_HOST"]."/");
	$root = $_SERVER["DOCUMENT_ROOT"]."/";
} 

define("WS_ROOT", "$root");
define("AD_NAME", "admin");
define("BG_COLOR", "#BCD8FA");
define("CONTACT_EMAIL", "thesminh@yahoo.com");
define("ROWS_OF_USERLIST_ADMIN", "2");
define("ROWS_OF_ADMIN_LIST", "17");

define("UPLOADED_FILE_TYPES", ".gif, .jpg, .tiff, .jpeg, .bmp, .doc, .docx, .csv, .xml, .xls, .xlsx, .flv, .swf, .zip, .txt .html .htm.");
define("IMAGE_FILE_TYPES", ".gif, .jpg, .tiff, .jpeg, .bmp, .flv, .swf.");

if (ini_get("register_globals")==null || ini_get("register_globals")==0 || ini_get("register_globals")=="")
{
	foreach ($_GET as $k => $v ) {
		${$k} = $v;
	} 
	foreach ($_POST as $k => $v ) {
		${$k} = $v;
	}

}

if (strpos(strtoupper($HTTP_USER_AGENT), "FIREFOX")===false) 
	define("IE", "true");
else
	define("IE", "false");
?>